package cn.edu.lcu.cs.javaprogramming.enumdemo;

import lombok.Getter;

@Getter
public enum PrimaryColor {
    RED("红色", 3), GREEN("绿色", 5), BLUE("蓝色", 10);

    private String name;
    private int index;

    private PrimaryColor(String name, int index) {
        this.name = name;
        this.index = index;
    }

    @Override
    public String toString() {
        return name;
    }
}
